﻿
using GSSoftSL.Web.Models.Shared;

namespace GSSoftSL.Web.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies BienLaiMetadata as the class
    // that carries additional metadata for the BienLai class.
    [MetadataTypeAttribute(typeof(BienLai.BienLaiMetadata))]
    public partial class BienLai
    {

        // This class allows you to attach custom attributes to properties
        // of the BienLai class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class BienLaiMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private BienLaiMetadata()
            {
            }

            //[Composition]
            [Include]
            public EntityCollection<BienLaiCT> BienLaiCTs { get; set; }

            public Guid BienLaiId { get; set; }

            [Required(AllowEmptyStrings = true)]
            public string GhiChu { get; set; }

            public HocVien HocVien { get; set; }

            public int KhoaHoc { get; set; }

            public string MaHV { get; set; }

            [Required]
            public DateTime NgayDong { get; set; }

            public DateTime NgayTao { get; set; }

            public Guid NguoiThu { get; set; }

            [Required(AllowEmptyStrings = true)]
            public string SoBienLai { get; set; }

            public decimal TongTienSauGiam { get; set; }

            public decimal TongTienThanhToan { get; set; }

            public decimal TongTienTruocGiam { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies BienLaiCTMetadata as the class
    // that carries additional metadata for the BienLaiCT class.
    [MetadataTypeAttribute(typeof(BienLaiCT.BienLaiCTMetadata))]
    public partial class BienLaiCT
    {

        // This class allows you to attach custom attributes to properties
        // of the BienLaiCT class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class BienLaiCTMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private BienLaiCTMetadata()
            {
            }

            public BienLai BienLai { get; set; }

            public Guid BienLaiId { get; set; }

            public decimal HocPhiSauGiam { get; set; }

            public decimal HocPhiTruocGiam { get; set; }

            public KhoaHoc KhoaHoc { get; set; }

            public Guid KhoaHocId { get; set; }

            public decimal MucGiam { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CaHocMetadata as the class
    // that carries additional metadata for the CaHoc class.
    [MetadataTypeAttribute(typeof(CaHoc.CaHocMetadata))]
    public partial class CaHoc
    {

        // This class allows you to attach custom attributes to properties
        // of the CaHoc class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CaHocMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CaHocMetadata()
            {
            }

            [Display(Name = "Bắt đầu", Order = 2)]
            [DisplayFormat(DataFormatString = "{0:HH:mm}")]
            public TimeSpan BatDau { get; set; }

            [Display(Name = "Kết thúc", Order = 3)]
            [DisplayFormat(DataFormatString = "{0:HH:mm}")]
            public TimeSpan KetThuc { get; set; }

            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHocChiTiet> KhoaHocChiTiets { get; set; }

            [Display(Name = "Mã ca học", Order = 0)]
            [Required(AllowEmptyStrings = true)]
            public string MaCaHoc { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid NguoiTao { get; set; }

            [Display(Name = "Ghi chú", Order = 1)]
            public string TenCaHoc { get; set; }

            [Display(Name = "Trạng thái", AutoGenerateField = false)]
            public int TrangThai { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies DiemDanhMetadata as the class
    // that carries additional metadata for the DiemDanh class.
    [MetadataTypeAttribute(typeof(DiemDanh.DiemDanhMetadata))]
    public partial class DiemDanh
    {

        // This class allows you to attach custom attributes to properties
        // of the DiemDanh class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class DiemDanhMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private DiemDanhMetadata()
            {
            }

            public int BuoiHoc { get; set; }

            public bool CoGiaoVien { get; set; }

            public EntityCollection<DiemDanhCT> DiemDanhCTs { get; set; }

            public Guid DiemDanhId { get; set; }

            public KhoaHoc KhoaHoc { get; set; }

            public Guid KhoaHocId { get; set; }

            public DateTime NgayCapNhat { get; set; }

            public DateTime NgayDiemDanh { get; set; }

            public DateTime NgayTao { get; set; }

            public Guid NguoiCapNhat { get; set; }

            public Guid NguoiTao { get; set; }

            public int SoLuongHV { get; set; }

            public int SoLuongVang { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies DiemDanhCTMetadata as the class
    // that carries additional metadata for the DiemDanhCT class.
    [MetadataTypeAttribute(typeof(DiemDanhCT.DiemDanhCTMetadata))]
    public partial class DiemDanhCT
    {

        // This class allows you to attach custom attributes to properties
        // of the DiemDanhCT class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class DiemDanhCTMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private DiemDanhCTMetadata()
            {
            }

            public bool CoPhep { get; set; }

            public DiemDanh DiemDanh { get; set; }

            public Guid DiemDanhId { get; set; }

            public HocVien HocVien { get; set; }

            public string LyDo { get; set; }

            public string MaHV { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies GiaoVienMetadata as the class
    // that carries additional metadata for the GiaoVien class.
    [MetadataTypeAttribute(typeof(GiaoVien.GiaoVienMetadata))]
    public partial class GiaoVien
    {

        // This class allows you to attach custom attributes to properties
        // of the GiaoVien class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class GiaoVienMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private GiaoVienMetadata()
            {
            }

            //[Include, Composition]
            [Include]
            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHoc> KhoaHocs { get; set; }

            [Display(Name = "Địa chỉ", Order = 4)]
            public string DiaChi { get; set; }

            [Display(Name = "Điện thoại", Order = 5)]
            public string DienThoai { get; set; }

            [Display(Name = "Email", Order = 6)]
            public string Email { get; set; }

            [Display(Name = "Ghi chú", Order = 7)]
            public string GhiChu { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid GiaoVienID { get; set; }

            [Include]
            //[Composition]
            [Display(AutoGenerateField = false)]
            public EntityCollection<GiaoVienMon> GiaoVienMons { get; set; }

            [Display(Name = "Giới tính", Order = 2)]
            [Required(ErrorMessage = "Giới tính không được phép để trống.")]
            public int GioiTinh { get; set; }

            /*[Display(AutoGenerateField = false)]
            public EntityCollection<Lop> Lops { get; set; }*/

            [Display(Name = "Mã GV", Order = 0)]
            [Required(AllowEmptyStrings = true)]//ErrorMessage = "Mã giáo viên không được phép để trống.", )]
            public string MaGV { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayCapNhat { get; set; }

            [Display(Name = "Ngày sinh", Order = 3)]
            [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")]
            //[Required(ErrorMessage = "Ngày sinh không được phép để trống.")]
            [CustomValidation(typeof(BirthdayValidation), "NgaySinhValidation", ErrorMessage = "Ngày sinh không hợp lệ")]
            public Nullable<DateTime> NgaySinh { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiTao { get; set; }

            [Display(Name = "Tên GV", Order = 1)]
            [Required(ErrorMessage = "Tên giáo viên không được phép để trống.")]
            public string TenGV { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies GiaoVienMonMetadata as the class
    // that carries additional metadata for the GiaoVienMon class.
    [MetadataTypeAttribute(typeof(GiaoVienMon.GiaoVienMonMetadata))]
    public partial class GiaoVienMon
    {

        // This class allows you to attach custom attributes to properties
        // of the GiaoVienMon class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class GiaoVienMonMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private GiaoVienMonMetadata()
            {
            }

            public Guid GiaoVienId { get; set; }

            public string MaMon { get; set; }

            [Include]
            public GiaoVien GiaoVien { get; set; }

            [Include]
            public Mon Mon { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies HocVienMetadata as the class
    // that carries additional metadata for the HocVien class.
    [MetadataTypeAttribute(typeof(HocVien.HocVienMetadata))]
    public partial class HocVien
    {

        // This class allows you to attach custom attributes to properties
        // of the HocVien class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class HocVienMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private HocVienMetadata()
            {
            }

            [Display(AutoGenerateField = false)]
            public EntityCollection<BienLai> BienLais { get; set; }

            [Display(Name = "Địa chỉ", Order = 7)]
            public string DiaChiNha { get; set; }

            [Display(AutoGenerateField = false)]
            public EntityCollection<DiemDanhCT> DiemDanhCTs { get; set; }

            [Display(Name = "ĐT cá nhân", Order = 5)]
            public string DTCaNhan { get; set; }

            [Display(Name = "Điện thoại", Order = 8)]
            public string DTCha { get; set; }

            [Display(Name = "Điện thoại", Order = 10)]
            public string DTMe { get; set; }

            [Display(Name = "Điện thoại", Order = 11)]
            public string DTNguoiBaoTro { get; set; }

            [Display(Name = "ĐT nhà", Order = 4)]
            public string DTNha { get; set; }

            [Display(Name = "Email", Order = 6)]
            public string Email { get; set; }

            [Display(Name = "Ghi chú", Order = 12)]
            public string GhiChu { get; set; }

            [Display(Name = "Giới tính", Order = 3)]
            public int GioiTinh { get; set; }

            [Display(Name = "Họ HV", Order = 1)]
            [Required(ErrorMessage = "Họ học viên không được để trống.")]
            public string HoLot { get; set; }

            [Display(Name = "Họ tên cha", Order = 7)]
            public string HoTenCha { get; set; }

            [Display(Name = "Họ tên mẹ", Order = 9)]
            public string HoTenMe { get; set; }

            [Display(Name = "Người bảo trợ", Order = 11)]
            public string HoTenNguoiBaoTro { get; set; }

            /*[Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHoc> KhoaHocs { get; set; }*/

            [Display(Name = "Khối lớp", Order = 13)]
            public Nullable<int> KhoiLop { get; set; }

            [Display(Name = "Mã HV", Order = 0)]
            [Required(AllowEmptyStrings = true)]
            public string MaHV { get; set; }

            [Display(AutoGenerateField = false)]
            public string MaTruong { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayCapNhat { get; set; }

            [Display(Name = "Ngày sinh", Order = 4)]
            [CustomValidation(typeof(BirthdayValidation), "NgaySinhValidation", ErrorMessage = "Ngày sinh không hợp lệ")]
            public Nullable<DateTime> NgaySinh { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid NguoiTao { get; set; }

            [Display(AutoGenerateField = false)]
            public long STT { get; set; }

            [Display(Name = "Tên HV", Order = 2)]
            [Required(ErrorMessage = "Tên học viên không được để trống.")]
            public string Ten { get; set; }

            [Display(AutoGenerateField = false)]
            public Truong Truong { get; set; }

            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHocDiem> KhoaHocDiems { get; set; }

            [Display(AutoGenerateField = false)]
            //[Include, Composition]
            [Include]
            public EntityCollection<KhoaHocHocVien> KhoaHocHocViens { get; set; }
			
			public string NgheNghiepCha { get; set; }

            public string NgheNghiepMe { get; set; }
			
			public ThongTin ThongTin { get; set; }

            public Nullable<int> ThongTinId { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies KhoaHocMetadata as the class
    // that carries additional metadata for the KhoaHoc class.
    [MetadataTypeAttribute(typeof(KhoaHoc.KhoaHocMetadata))]
    public partial class KhoaHoc
    {

        // This class allows you to attach custom attributes to properties
        // of the KhoaHoc class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class KhoaHocMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private KhoaHocMetadata()
            {
            }

            [Display(Name = "Bắt đầu", Order = 3)]
            [CustomValidation(typeof(KhoaHocValidation), "Validation")]
            public DateTime BatDau { get; set; }

            //[Include, Composition]
            [Include]
            [Display(AutoGenerateField = false)]
            public EntityCollection<BienLaiCT> BienLaiCTs { get; set; }

            //[Include, Composition]
            [Include]
            [Display(AutoGenerateField = false)]
            public EntityCollection<DiemDanh> DiemDanhs { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid GiaoVienId { get; set; }

            [Include]
            public GiaoVien GiaoVien { get; set; }

            [Display(Name = "Học phí", Order = 5)]
            public decimal HocPhi { get; set; }

            [Display(Name = "Học phí buổi", Order = 6)]
            public decimal HocPhiBuoi { get; set; }

            [Display(Name = "Kết thúc", Order = 4)]
            public DateTime KetThuc { get; set; }

            //[Include, Composition]
            [Include]
            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHocCotDiem> KhoaHocCotDiems { get; set; }

            //[Include, Composition]
            [Include]
            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHocChiTiet> KhoaHocChiTiets { get; set; }

            //[Include, Composition]
            [Include]
            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHocDiem> KhoaHocDiems { get; set; }

            //[Include, Composition]
            [Include]
            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHocHocVien> KhoaHocHocViens { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid KhoaHocId { get; set; }

            [Include]
            [Display(AutoGenerateField = false)]
            public Lop Lop { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid LopId { get; set; }

            [Display(Name = "Mã khóa học", Order = 0)]
            [Required(AllowEmptyStrings = true)]
            public string MaKhoaHoc { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayCapNhat { get; set; }

            [Display(Name = "Ngày khai giảng", Order = 2), Required(ErrorMessage = "Vui lòng nhập ngày khai giảng khóa học.")]
            public DateTime NgayKhaiGiang { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid NguoiTao { get; set; }

            [Display(AutoGenerateField = false)]
            public int STT { get; set; }

            [Display(Name = "Tên khóa học", Order = 1)]
            [Required(ErrorMessage = "Tên khóa không được phép để trống.")]
            public string TenKhoaHoc { get; set; }

            
        }
    }

    // The MetadataTypeAttribute identifies KhoaHocCotDiemMetadata as the class
    // that carries additional metadata for the KhoaHocCotDiem class.
    [MetadataTypeAttribute(typeof(KhoaHocCotDiem.KhoaHocCotDiemMetadata))]
    public partial class KhoaHocCotDiem
    {

        // This class allows you to attach custom attributes to properties
        // of the KhoaHocCotDiem class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class KhoaHocCotDiemMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private KhoaHocCotDiemMetadata()
            {
            }

            public KhoaHoc KhoaHoc { get; set; }

            public Guid KhoaHocId { get; set; }

            public Nullable<DateTime> NgayKiemTra { get; set; }

            public DateTime NgayTao { get; set; }

            public Guid NguoiTao { get; set; }

            public int STT { get; set; }

            public string Ten { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies KhoaHocChiTietMetadata as the class
    // that carries additional metadata for the KhoaHocChiTiet class.
    [MetadataTypeAttribute(typeof(KhoaHocChiTiet.KhoaHocChiTietMetadata))]
    public partial class KhoaHocChiTiet
    {

        // This class allows you to attach custom attributes to properties
        // of the KhoaHocChiTiet class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class KhoaHocChiTietMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private KhoaHocChiTietMetadata()
            {
            }

            public int BuoiHoc { get; set; }

            public CaHoc CaHoc { get; set; }

            public KhoaHoc KhoaHoc { get; set; }

            public Guid KhoaHocId { get; set; }

            public string MaCaHoc { get; set; }

            public string MaPhong { get; set; }

            public int NgayTrongTuan { get; set; }
            
            [Include]
            public Phong Phong { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies KhoaHocDiemMetadata as the class
    // that carries additional metadata for the KhoaHocDiem class.
    [MetadataTypeAttribute(typeof(KhoaHocDiem.KhoaHocDiemMetadata))]
    public partial class KhoaHocDiem
    {

        // This class allows you to attach custom attributes to properties
        // of the KhoaHocDiem class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class KhoaHocDiemMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private KhoaHocDiemMetadata()
            {
            }

            public int Cot { get; set; }

            public decimal Diem { get; set; }

            public HocVien HocVien { get; set; }

            public KhoaHoc KhoaHoc { get; set; }

            public Guid KhoaHocId { get; set; }

            public string MaHV { get; set; }

            public DateTime NgayTao { get; set; }

            public Guid NguoiTao { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies KhoaHocHocVienMetadata as the class
    // that carries additional metadata for the KhoaHocHocVien class.
    [MetadataTypeAttribute(typeof(KhoaHocHocVien.KhoaHocHocVienMetadata))]
    public partial class KhoaHocHocVien
    {

        // This class allows you to attach custom attributes to properties
        // of the KhoaHocHocVien class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class KhoaHocHocVienMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private KhoaHocHocVienMetadata()
            {
            }

            //[Include]
            public HocVien HocVien { get; set; }

            //[Include]
            public KhoaHoc KhoaHoc { get; set; }

            public Guid KhoaHocId { get; set; }

            public string MaHV { get; set; }

            public Nullable<int> TrangThai { get; set; }

            public int TrangThaiHocPhi { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies LopMetadata as the class
    // that carries additional metadata for the Lop class.
    [MetadataTypeAttribute(typeof(Lop.LopMetadata))]
    public partial class Lop
    {

        // This class allows you to attach custom attributes to properties
        // of the Lop class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class LopMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private LopMetadata()
            {
            }

            //[Include, Composition]
            [Include]
            public EntityCollection<KhoaHoc> KhoaHocs { get; set; }

            [Display(AutoGenerateField = false)]
            public Guid LopId { get; set; }

            [Display(Name = "Mã lớp", Order = 0)]
            [Required(AllowEmptyStrings = true)]
            public string MaLop { get; set; }

            public string MaMon { get; set; }

            [Include]
            [Display(AutoGenerateField = false)]
            public Mon Mon { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiTao { get; set; }

            [Display(Name = "Tên lớp", Order = 1)]
            [Required(ErrorMessage = "Tên lớp không được phép để trống.")]
            public string TenLop { get; set; }

            [Display(Name = "Trạng thái", Order = 2)]
            public int TrangThai { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies MonMetadata as the class
    // that carries additional metadata for the Mon class.
    [MetadataTypeAttribute(typeof(Mon.MonMetadata))]
    public partial class Mon
    {

        // This class allows you to attach custom attributes to properties
        // of the Mon class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class MonMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private MonMetadata()
            {
            }

            [Display(AutoGenerateField = false)]
            //[Composition]
            [Include]
            public EntityCollection<GiaoVienMon> GiaoVienMons { get; set; }

            [Display(AutoGenerateField = false)]
            public EntityCollection<Lop> Lops { get; set; }

            [Display(Name = "Mã môn", Order = 0)]
            [Required(AllowEmptyStrings = true)]
            public string MaMon { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiTao { get; set; }

            [Display(Name = "Tên môn", Order = 1)]
            [Required(ErrorMessage = "Tên môn không được phép để trống.")]
            public string TenMon { get; set; }

            [Display(Name = "Thứ tự", Order = 2)]
            public int ThuTu { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies PhongMetadata as the class
    // that carries additional metadata for the Phong class.
    [MetadataTypeAttribute(typeof(Phong.PhongMetadata))]
    public partial class Phong
    {

        // This class allows you to attach custom attributes to properties
        // of the Phong class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class PhongMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private PhongMetadata()
            {
            }

            [Display(AutoGenerateField = false)]
            public EntityCollection<KhoaHocChiTiet> KhoaHocChiTiets { get; set; }

            [Display(Name = "Mã phòng", Order = 0)]
            [Required(AllowEmptyStrings = true)]
            public string MaPhong { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<DateTime> NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiTao { get; set; }

            [Display(Name = "Tầng", Order = 2)]
            public Nullable<int> Tang { get; set; }

            [Display(Name = "Tên phòng", Order = 1)]
            [Required(ErrorMessage = "Tên phòng không được phép để trống.")]
            public string TenPhong { get; set; }
        }
    }
	
	// The MetadataTypeAttribute identifies ThongTinMetadata as the class
    // that carries additional metadata for the ThongTin class.
    [MetadataTypeAttribute(typeof(ThongTin.ThongTinMetadata))]
    public partial class ThongTin
    {

        // This class allows you to attach custom attributes to properties
        // of the ThongTin class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class ThongTinMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private ThongTinMetadata()
            {
            }

            public string GhiChu { get; set; }

            public EntityCollection<HocVien> HocViens { get; set; }

            public int ThongTinId { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies TruongMetadata as the class
    // that carries additional metadata for the Truong class.
    [MetadataTypeAttribute(typeof(Truong.TruongMetadata))]
    public partial class Truong
    {

        // This class allows you to attach custom attributes to properties
        // of the Truong class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class TruongMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private TruongMetadata()
            {
            }

            [Display(Name = "Ghi chú", Order = 2)]
            public string GhiChu { get; set; }

            [Display(AutoGenerateField = false)]
            public EntityCollection<HocVien> HocViens { get; set; }

            [Display(Name = "Mã trường", Order = 0)]
            [Required(AllowEmptyStrings = true)]
            public string MaTruong { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public DateTime NgayTao { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiCapNhat { get; set; }

            [Display(AutoGenerateField = false)]
            public Nullable<Guid> NguoiTao { get; set; }

            [Required(ErrorMessage = "Tên trường không được phép để trống."), Display(Name = "Tên trường", Order = 1)]
            public string TenTruong { get; set; }
        }
    }
}
